home *** CD-ROM | disk | FTP | other *** search
Wrap
aaaaffffGGGGeeeettttMMMMiiiissssccccIIIIDDDDssss((((3333ddddmmmm)))) aaaaffffGGGGeeeettttMMMMiiiissssccccIIIIDDDDssss((((3333ddddmmmm)))) NNNNAAAAMMMMEEEE afGetMiscIDs, afGetMiscType, afGetMiscSize - get number and list of miscellaneous chunk ID's for a file, get the data type and size for a miscellaneous data chunk. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////aaaauuuuddddiiiiooooffffiiiilllleeee....hhhh>>>> iiiinnnntttt aaaaffffGGGGeeeettttMMMMiiiissssccccIIIIDDDDssss((((AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee ffffiiiilllleeee,,,, iiiinnnntttt mmmmiiiisssscccciiiiddddssss[[[[]]]])))) iiiinnnntttt aaaaffffGGGGeeeettttMMMMiiiissssccccTTTTyyyyppppeeee((((AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee ffffiiiilllleeee,,,, iiiinnnntttt cccchhhhuuuunnnnkkkkiiiidddd)))) iiiinnnntttt aaaaffffGGGGeeeettttMMMMiiiissssccccSSSSiiiizzzzeeee((((AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee ffffiiiilllleeee,,,, iiiinnnntttt cccchhhhuuuunnnnkkkkiiiidddd)))) PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRR _f_i_l_e is an AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee structure, created when an audio file was opened by a call to aaaaffffOOOOppppeeeennnnFFFFiiiilllleeee(3dm). _m_i_s_c_i_d_s[] is an array of integer locations used to return a list of unique positive miscellaneous chunk ID's which can be used to reference the miscellaneous chunks in a file. _c_h_u_n_k_i_d is a miscellaneous chunk id from the _m_i_s_c_i_d_s[] list returned by aaaaffffGGGGeeeettttMMMMiiiissssccccIIIIDDDDssss(((()))). RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE aaaaffffGGGGeeeettttMMMMiiiissssccccIIIIDDDDssss(((()))) returns a nonnegative integer count of the number of miscellaneous chunks in the file, or -1 on error. aaaaffffGGGGeeeettttMMMMiiiissssccccTTTTyyyyppppeeee(((()))) returns a positive symbolic constant denoting the chunk type for a given miscellaneous chunk ID. If there is an error or the chunk ID is invalid for the file, the return value is -1. aaaaffffGGGGeeeettttMMMMiiiissssccccSSSSiiiizzzzeeee(((()))) returns a nonnegative integer count of the number of data bytes contained in the specified chunk, or -1 on error. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN The Audio File Library allows you to access file format-specific non- audio data chunks in audio files through miscellaneous chunk ID's. Each ID corresponds to a chunk type and a chunk data size in bytes. aaaaffffGGGGeeeettttMMMMiiiissssccccIIIIDDDDssss(((()))) returns the number of miscellaneous chunks contained in _f_i_l_e. You can call aaaaffffGGGGeeeettttMMMMiiiissssccccIIIIDDDDssss(((()))) with a null _m_i_s_c_i_d_s pointer, and allocate a _m_i_s_c_i_d_s[] buffer according to the return value. You can then pass the _m_i_s_c_i_d_s[] buffer back to aaaaffffGGGGeeeettttMMMMiiiissssccccIIIIDDDDssss(((()))) to obtain a list of ID's for the various chunks of miscellaneous data in _f_i_l_e. aaaaffffGGGGeeeettttMMMMiiiissssccccTTTTyyyyppppeeee(((()))) gives you the chunk type for a given chunk ID. Valid miscellaneous data types are: PPPPaaaaggggeeee 1111 aaaaffffGGGGeeeettttMMMMiiiissssccccIIIIDDDDssss((((3333ddddmmmm)))) aaaaffffGGGGeeeettttMMMMiiiissssccccIIIIDDDDssss((((3333ddddmmmm)))) AAAAFFFF____MMMMIIIISSSSCCCC____CCCCOOOOPPPPYYYY Copyright string AAAAFFFF____MMMMIIIISSSSCCCC____AAAAUUUUTTTTHHHH Author/artist string AAAAFFFF____MMMMIIIISSSSCCCC____NNNNAAAAMMMMEEEE Name string AAAAFFFF____MMMMIIIISSSSCCCC____AAAANNNNNNNNOOOO AIFF/AIFF-C annotation string AAAAFFFF____MMMMIIIISSSSCCCC____MMMMIIIIDDDDIIII AIFF/AIFF-C MIDI system exclusive data AAAAFFFF____MMMMIIIISSSSCCCC____AAAAPPPPPPPPLLLL AIFF/AIFF-C application-specific data AAAAFFFF____MMMMIIIISSSSCCCC____PPPPCCCCMMMMMMMMAAAAPPPP PCM mapping information (for future use) AAAAFFFF____MMMMIIIISSSSCCCC____NNNNeeeeXXXXTTTT NeXT file info chunk AAAAFFFF____MMMMIIIISSSSCCCC____IIIIRRRRCCCCAAAAMMMM____PPPPEEEEAAAAKKKKAAAAMMMMPPPP BICSF peak amplitude sfcode AAAAFFFF____MMMMIIIISSSSCCCC____CCCCOOOOMMMMMMMMEEEENNNNTTTT Text comment string. The tags AAAAFFFF____MMMMIIIISSSSCCCC____IIIIRRRRCCCCAAAAMMMM____CCCCOOOOMMMMMMMMEEEENNNNTTTT and AAAAFFFF____MMMMIIIISSSSCCCC____IIIICCCCMMMMTTTT are also allowed for this type, though this chunk is supported by several file types. AAAAFFFF____MMMMIIIISSSSCCCC____IIIICCCCRRRRDDDD Creation date string. This is usually of the form "YYYY-MM-DD". AAAAFFFF____MMMMIIIISSSSCCCC____IIIISSSSFFFFTTTT Software name string. Usually set to the name of the software package which created the sound. AAAAFFFF____MMMMIIIISSSSCCCC____UUUUNNNNRRRREEEECCCCOOOOGGGGNNNNIIIIZZZZEEEEDDDD unrecognized data chunk See the AIFF-C spec for descriptions of the first six chunks, and the various audio format man pages (nnnneeeexxxxtttt(4), bbbbiiiiccccssssffff(3dm)) for the remainder. Since the AIFF-C format is extensible, and new audio file formats are likely to be added to the AF in future versions, the AAAAFFFF____MMMMIIIISSSSCCCC____UUUUNNNNRRRREEEECCCCOOOOGGGGNNNNIIIIZZZZEEEEDDDD data type is included to handle any data chunks encountered in a file which are neither part of the AIFF-C standard nor recognized by the other currently supported file formats. aaaaffffGGGGeeeettttMMMMiiiissssccccSSSSiiiizzzzeeee(((()))) returns the number of data bytes in the chunk. Note: for AIFF-C (AIFF) files, you don't have to worry about the possible trailing zero pad byte at the end of a miscellaneous chunk data area. The library hides this file format implementation detail. EEEEXXXXAAAAMMMMPPPPLLLLEEEE The routine aaaaffffRRRReeeeaaaaddddMMMMiiiisssscccc(3dm) allows you to read miscellaneous data from an audio file. In order to read a copyright string from an AIFF-C file, for example, you first obtain a list of miscellaneous chunk ID's for the file by querying aaaaffffGGGGeeeettttMMMMiiiissssccccIIIIDDDDssss(((()))). PPPPaaaaggggeeee 2222 aaaaffffGGGGeeeettttMMMMiiiissssccccIIIIDDDDssss((((3333ddddmmmm)))) aaaaffffGGGGeeeettttMMMMiiiissssccccIIIIDDDDssss((((3333ddddmmmm)))) You determine the type of each miscellaneous chunk by calling aaaaffffGGGGeeeettttMMMMiiiissssccccTTTTyyyyppppeeee(((()))) for each of the ID's. The ID which has chunk type AAAAFFFF____MMMMIIIISSSSCCCC____CCCCOOOOPPPPYYYY corresponds to the copyright string in the file. You can determine the length of the string by passing the ID to aaaaffffGGGGeeeettttMMMMiiiissssccccSSSSiiiizzzzeeee(((()))), and allocate a buffer with the appropriate length (allocate one extra location for the null-terminator). Finally, you obtain a copy of the string by passing the chunk ID, buffer, and buffer length to aaaaffffRRRReeeeaaaaddddMMMMiiiisssscccc(3dm). Put a null character in the last buffer location to null-terminate the string. CCCCAAAAVVVVEEEEAAAATTTTSSSS These functions may return ANY type of misc chunk, even one not included in <ddddmmmmeeeeddddiiiiaaaa////aaaauuuuddddiiiiooooffffiiiilllleeee....hhhh>. As indicated above, the possible types of misc chunk are no longer limited to those found in an AIFF/AIFF-C file. Apps should be written to expect and ignore miscellaneous chunks they do not understand. Apps should be especially careful not to copy misc chunks from one file to another unless they understand the content of those misc chunks; the chunk may contain references to other parts of the file which the application has modified. In this case the chunk in the new file becomes corrupt. This is to be avoided. The chunk should not be copied and the user should probably be warned. SSSSEEEEEEEE AAAALLLLSSSSOOOO afOpenFile(3dm), afReadMisc(3dm), afInitMiscIDs(3dm), afSeekMisc(3dm). PPPPaaaaggggeeee 3333